package com.kai.mapper.first;


import com.kai.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


/**
 * Created by kai on 17-3-31.
 */
//@MapperScan
@Repository
public interface UserMapper {

    //@Select("select * from oa_admin_user where userName= #{username} ")
    List<User> findUsersByUsername(Map<String, Object> map);

    User findUsersRoleByUsername(Map<String, Object> map);

    //@Select("select * from oa_admin_user where userName= #{username} and  password= #{password}")
    User loginCheck(@Param("username") String username,
                                   @Param("password") String password);

    //@Select("select count(*) from oa_admin_user ")
    int getCount(Map<String, Object> map);

   // @Select("select * from oa_admin_user ")
    List<User> findUserList();

    int saveUser(User user);
    int modifyUser(User user);
    int removeUser(@Param("userId") int userId);

    int modifyUserVatar(Map<String, Object> map);

}
